const Mock = require('mockjs')
//const BaseHost = 'http://localhost:8081'
const apiVersion = '/v1';

Mock.mock(apiVersion + '/image/upload', 'post', require('./data/image/upload'))

Mock.mock(apiVersion + '/web/user/auth/login', 'post', require('./data/user/auth/login'))
Mock.mock(apiVersion + '/web/user/auth/send_code', 'post', require('./data/user/auth/send_code'))
Mock.mock(apiVersion + '/web/user/auth/login_code', 'post', require('./data/user/auth/login_code'))
Mock.mock(apiVersion + '/web/user/auth/register', 'post', require('./data/user/auth/register'))
Mock.mock(apiVersion + '/web/user/auth/reset_password', 'post', require('./data/user/auth/reset_password'))

Mock.mock(apiVersion + '/web/page/index/info', 'post', require('./data/page/index/info'))

Mock.mock(RegExp(apiVersion + '/web/article/info/list' + ".*"), 'post', require('./data/article/info/list'))
Mock.mock(RegExp(apiVersion + '/web/article/info/' + ".*" + '/detail'), 'post', require('./data/article/info/detail'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/comment/list'), 'post', require('./data/article/action/comment/list'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/comment/add'), 'post', require('./data/article/action/comment/add'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/comment/delete'), 'post', require('./data/article/action/comment/delete'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/upvote'), 'post', require('./data/article/action/upvote'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/cancel_upvote'), 'post', require('./data/article/action/cancel_upvote'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/add_favorite'), 'post', require('./data/article/action/add_favorite'))
Mock.mock(RegExp(apiVersion + '/web/article/action/' + ".*" + '/cancel_favorite'), 'post', require('./data/article/action/cancel_favorite'))

Mock.mock(RegExp(apiVersion + '/web/public/category/list' + ".*"), 'post', require('./data/public/category/list'))

Mock.mock(RegExp(apiVersion + '/web/proposal/info/list' + ".*"), 'post', require('./data/proposal/info/list'))
Mock.mock(RegExp(apiVersion + '/web/proposal/info/'+".*"+'/detail'), 'post', require('./data/proposal/info/detail'))
Mock.mock(RegExp(apiVersion + '/web/proposal/info/add' + ".*"), 'post', require('./data/proposal/info/add'))

Mock.mock(RegExp(apiVersion + '/web/proposal/template/list' + ".*"), 'post', require('./data/proposal/template/list'))
Mock.mock(RegExp(apiVersion + '/web/proposal/template/'+".*"+'detail'), 'post', require('./data/proposal/template/detail'))

Mock.mock(RegExp(apiVersion + '/web/user/info/favorite'), 'post', require('./data/user/info/favorite'))
Mock.mock(RegExp(apiVersion + '/web/user/info/comment'), 'post', require('./data/user/info/comment'))
Mock.mock(RegExp(apiVersion + '/web/user/info/upvote'), 'post', require('./data/user/info/upvote'))
Mock.mock(RegExp(apiVersion + '/web/user/info/update'), 'post', require('./data/user/info/update'))

Mock.mock(RegExp(apiVersion + '/web/user/info/role/apply/'+'.*'+'/cancel' + ".*"), 'post', require('./data/user/info/role/apply/cancel'))
Mock.mock(RegExp(apiVersion + '/web/user/info/role/apply'), 'post', require('./data/user/info/role/apply'))
